package pl.polsl.pum2.pj;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class PauseActivity extends Activity {

  @Override
  protected void onCreate(Bundle icicle) {
    // Be sure to call the super class.
    super.onCreate(icicle);

    requestWindowFeature(Window.FEATURE_LEFT_ICON);

    // Have the system blur any windows behind this one.
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

    setContentView(R.layout.pause);

    getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert);

    Button btnResume = (Button) findViewById(R.id.button1);
    btnResume.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        finish();
      }
    });

    Button btnExit = (Button) findViewById(R.id.button2);
    btnExit.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
    	  if (RubikActivity.getInstance() != null) {
              RubikActivity.getInstance().finish();
    	  }
    	  finish();        
      }
    });
  }

}
